package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author du
 * date 2018/7/29 下午7:04
 */
public class ChannelEntity implements Parcelable {
    /**
     * channel_id : 1
     * channel_name : 小学奥数
     */

    private String channel_id;//频道id
    private String channel_name;//频道名

    public String getChannel_id() { return channel_id;}

    public void setChannel_id(String channel_id) { this.channel_id = channel_id;}

    public String getChannel_name() { return channel_name;}

    public void setChannel_name(String channel_name) { this.channel_name = channel_name;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.channel_id);
        dest.writeString(this.channel_name);
    }

    public ChannelEntity() {}

    protected ChannelEntity(Parcel in) {
        this.channel_id = in.readString();
        this.channel_name = in.readString();
    }

    public static final Creator<ChannelEntity> CREATOR = new Creator<ChannelEntity>() {
        @Override
        public ChannelEntity createFromParcel(Parcel source) {return new ChannelEntity(source);}

        @Override
        public ChannelEntity[] newArray(int size) {return new ChannelEntity[size];}
    };

    @Override
    public String toString() {
        return "ChannelEntity{" +
                "channel_id='" + channel_id + '\'' +
                ", channel_name='" + channel_name + '\'' +
                '}';
    }
}
